<template>
	<view class="empty-block">
		<block v-if="!loading">
			<image src="../../static/common/nodata.svg" mode="widthFix" style="width: 500rpx;"></image>
			<view class="tip-text">
				{{tipText}}
			</view>
		</block>
		<block v-else="loading">
			<image src="../../static/common/loading.svg" mode="widthFix" style="width: 500rpx;"></image>
			<view class="tip-text">
				努力加载中...
			</view>
		</block>

	</view>
</template>

<script>
	export default {
		props: {
			bgColor: {
				type: String,
				default: "rgba(0,0,0,0)"
			},
			textColor: {
				type: String,
				default: "#909399"
			},
			tipText: {
				type: String,
				default: "暂无内容"
			},
			loading: {
				type: Boolean,
				default: false
			}
		},
		name: "empty",
		data() {
			return {
				emptyIcon: require('@/static/common/nodata.svg')
			};
		}
	}
</script>

<style lang="scss" scoped>
	.empty-block {
		position: relative;
		width: 100%;
		padding: 100rpx 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.tip-text {
			margin-top: 20rpx;
			font-size: 26rpx;
			letter-spacing: 2rpx;
		}
	}
</style>
